#pragma once

#include "QuakeTypes.h"

namespace IdQuake
{
	int LittleLong(int l);
	short LittleShort(short l);
	float LittleFloat (float f);

	void Sys_Error (const QS::String& error, ...);
	void Q_memcpy (void *dest, void *src, int count);
	int Q_strncmp (char *s1, char *s2, int count);

	//
	//Simplified hunk functions used by model loading code
	//
	int	Hunk_LowMark (void);
	void Hunk_FreeToLowMark (int mark);
	void *Hunk_AllocName (int size, const QS::String&);

	//Dummy cache functions
	void *Cache_Check (cache_user_t *c);
	void Cache_Free (cache_user_t *c);

	inline void VectorCopy(vec3_t a, vec3_t b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
	vec_t Length(vec3_t v);
}